<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="jt.classic.system.object.IObject"%>
<%@ page import="jt.classic.system.workflow.WObject"%>
<%@ page import="org.limp.basework.Table"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.util.List"%>
<%@ page import="jt.classic.system.databook.DataIndexScriptManager"%>
<%
	String context = jt.classic.system.ISystem.getContextPath();
	IUser user = jt.classic.system.ISystem.getSessionUser(request);
	IObject obj = (IObject) request.getAttribute("object");
	WObject wobject = (WObject) request.getAttribute("wobject");
	String id = StringTool.checkString(request.getParameter("id"));
	String querykey = StringTool.checkString(request.getParameter("querykey"));
	String type = StringTool.checkString(request.getParameter("type"));
	DataIndexScriptManager dataIndexScriptManager = DataIndexScriptManager.getInstance();
	String script = dataIndexScriptManager.getDataScript();
	
	Table table = wobject.itable("APP_LFDTL");
	List list1 = (List)obj.icontent(wobject.itable("APP_XFHANDLER"));
	List list = (List) obj.icontent(table);
	
	
	String g_groupName = "";
	if (list1 != null && !list1.isEmpty()) {
		for (int i = 0; i < list1.size(); i++) {
			Map info = (Map)list1.get(i);
			if(i ==0){
				g_groupName += info.get("H_GROUPNAME");
				
			}else{
				g_groupName += ","+info.get("H_GROUPNAME");
			}
			
		
		}
	}
    Map lfInfo = (Map)((List)obj.icontent(wobject.itable("APP_LF"))).get(0);
	
	String lftype = (String)lfInfo.get("LFTYPE");
	
	String root = "00000010";
	
	if(lftype.equals("1")){
		root = "00000001";
	}
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>来访登记</TITLE>
<script type="text/javascript">
var ddtreeJsonData = <%= script%>;
</script>
<jsp:include page="../../system/object/initial4edit.jsp"></jsp:include>

<link rel="stylesheet" type="text/css" href="<%=context%>/app/lf/css/xfstyle.css" />
<script src="<%=context %>/app/lf/js/xfinit.js"></script>
<script src="<%=context %>/app/lf/js/lfbl.js"></script>
<script src="<%=context %>/system/group/js/groupselect.js"></script>

<script>
     <%
		if (list != null && !list.isEmpty()) {
			for (int i = 0; i < list.size(); i++) {
		%>
     	handleTypeMap.put('lfdtid_<%=i%>', '-1');
		handleTypeMap.put('lfid_<%=i%>', '-1');
		handleTypeMap.put('XF_USERNAME_<%=i%>', '0');
		handleTypeMap.put('XF_USERSEX_<%=i%>', '0');
		handleTypeMap.put('XF_USERAGE_<%=i%>', '0');
		handleTypeMap.put('XF_USERLICENSE_<%=i%>', '0');
		handleTypeMap.put('XF_USERTEL_<%=i%>', '0');
		handleTypeMap.put('XF_USERCODE_<%=i%>', '0');
		handleTypeMap.put('XF_USERADDRESS_<%=i%>', '0');
	 <%          
		    }		
	    }
      %>

     /**
      * 页面初始化
      */
     function init(){
         initLfdjStyle();
         editObject();
     }
</script>
</HEAD>
<BODY style="background-color:#fff;" onload="javascript:init();">
<form id="form1" name="form1" method="post"
	enctype="multipart/form-data" action=""><input type="hidden"
	name="lfid" value="" special="none">
<div>&nbsp;</div>
<table width="800" align="center">
<tr><td align="left"><input type="button" name="btn0" value=" 自处理 " class="button0" onclick="javascript:handleSelf('<%=obj.id() %>');">
<input type="button" name="btn0" value=" 不受理 " class="button0" onclick="javascript:handleKO('<%=obj.id() %>');">
<input type="button" name="btn0" value=" 派 遣 " class="button0" onclick="javascript:handleOK('<%=obj.id() %>');">
<!--<input type="button" name="btn0" value=" 不能解决(上报) " class="button0" onclick="javascript:handleTurn('<%=obj.id() %>', '<%=obj.iname() %>');"> -->
</td></tr>
<tr><td></td></tr>
</table>
<table width="800" class="tab4edit" border="1" cellspacing="0"
	cellpadding="0" align="center">
	
	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center">来访登记信息</div>
		</td>
	</tr>
	<tr align="left" bgcolor="#FFFF99">
		<td colspan="4" valign="middle"><font color=red>带</font><font
			color="#003399">“</font><font color=red>*</font><font color="#003399">”</font><font
			color=red>的项目为必填项</font></td>
	</tr>
	<!--  <tr align="right" valign="middle" bgcolor="#FFFFFF">
		<td align="right" width="15%" valign="middle" class="td0">信访问题分类</td>
		<td align="left" width="35%">
		<input type="text" name="XFWTNAME" value="">
		</td>
		<td class="td0" width="15%">督办类型</td>
		<td align="left" width="35%"> <input
			type="hidden" name="DBLXNAME" value=""></td>
	</tr>
	<tr id="district1">
		<td align="right" valign="middle" class="td0">编号类型</td>
		<td align="left"><input
			type="hidden" name="BHLXNAME" value=""></td>
		<td align="right" class="td0">编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</td>
		<td align="left">
		<input type="text" name="LFCODE" maxlength="32" value=""/>&nbsp;&nbsp;<FONT SIZE="" COLOR="#FF0000">
		</FONT></td>
	</tr>
	<tr>
		<TD vAlign=center align=right class="td0">国家内容分类</TD>
		<TD align=left>
		<input type="text" name="GJNRNAME" id="GJNRNAME" value="" readonly="readonly">
		</TD>
		<td align="right" class="td0">性质分类</td>
		<td align="left">
		<input type="text" name="XZNAME" id="XZNAME" value="">
		</td>
	</tr>
-->
	<TR bgColor=#ffffff>
		<td align="right" valign="middle" class="td0">内容分类</td>
		<td align="left">
		<input type="text" name="NRNAME" id="NRNAME"  value="">
		</td>
		<td align="right" class="td0">信息来源</td>
		<td align="left">
		<input type="hidden" name="XXLYNAME" value=""></td>
	</TR>
	<tr>
		<td align="right" class="td0">是否区立案</td>
		<td align="left"  ><input type="radio" name="LA" value="0"
			  /> 是 <input type="radio" name="LA"
			value="1" checked="checked" /> 否</td>
		<td align="right" class="td0">处理情况 </td>
		<td align="left" > <input
			type="hidden" name="CLQKNAME" value=""></td>
	</tr>
	<tr  id="lianxinxi" > 
		<td align="right" valign="middle" class="td0">立案来源</td>
		<td align="left"><input type="hidden" name="LALYNAME" value=""></td>
		<td align="right" class="td0">立案编号</td>
		<td align="left"><input type="hidden" name="LAH" maxlength='30' readonly/> </td>
	</tr>
	<tr align="right" valign="middle">

		<td align="right" class="td0">日常接待</td>
		<td align="left"><input type="radio" name="RCJD"
			value="0" checked="checked" onclick="richangjiedai(true)" />
		日常接待&nbsp; <input type="radio" name="RCJD" value="1"
			onclick="richangjiedai(false)" /> 领导接待日接待&nbsp;</td>

		<td class="td0">
		<div id="jdr1">接 待 人</div>
		</td>
		<td align="left" style="display:block ">
		<div id="jdr2"><input type="text" name="JDR" maxlength="16"
			size="16" value="" /></div>
		</td>

	</tr>
	<tr align="right" valign="middle">

		<td class="td0">是否越级访问</td>
		<td align="left"  colspan="3"><input type="radio" name="SFYJFW" value="0"
			checked="checked" /> 否 <input type="radio" name="SFYJFW"
			value="1" /> 
		到市信访办上访 <input type="radio" name="SFYJFW" value="2" /> 到市其他部门上访
		 <input type="radio" name="SFYJFW" value="3" /> 到国家信访办上访
		  <input type="radio" name="SFYJFW" value="4" /> 到中央其他部门上访</td>
		
	</tr>
	<tr align="right" valign="middle" bgcolor="#FFFFFF">
		<!-- <td width="150" align="right" class="td0">是否有效信</td>
		<td width="250" align="left"><input type="radio" name="VALID"
			value="1" checked="checked" /> 是 <input type="radio" name="VALID"
			value="0" /> 否</td> -->
		<td width="150" class="td0" align="right">督办类型</td>
		<td width="250" align="left"><input type="hidden" name="DBLXID" value=""
			special="wordbook" wbtype="xf_dblx" wbname="DBLXNAME"> <input
			type="hidden" name="DBLXNAME" value=""></td>
		<td class="td0">处理形式</td>
		<td align="left">
		<input type="hidden" name="CLXSNAME" value="">
		</td>
	</tr>
	<tr>
		<td height="40" align="right" valign="middle" class="td0">来访性质</td>
		<td align="left" colspan="3"><input type="checkbox" name="LFXZID_0" value="1" />正常&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_1" value="1" />围堵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		<input type="checkbox" name="LFXZID_2" value="1" />滞留&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_3" value="1" />闹事&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		<input type="checkbox" name="LFXZID_4" value="1" />静坐&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_5" value="1" />重要访&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
		<input type="checkbox" name="LFXZID_6" value="1" />强制&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		<input type="checkbox" name="LFXZID_7" value="1" />越级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_8" value="1" />不稳定因素&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_9" value="1" />包案后上访&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_10" value="1" />未预报（20人以上）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
	</tr>
<!--  
	<tr align="right" valign="middle">
		<td class="td0">下访后上访</td>
		<td align="left"><input type="checkbox" name="XFHSSF" value="1" />
		</td>
		<td class="td0">包&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;案</td>
		<td align="left"><input type="checkbox" name="BA" value="1" /></td>
	</tr>
-->
	<tr align="right" valign="middle">
		<!-- <td class="td0">结果已回复</td>
		<td align="left"><input type="checkbox" name="JGYHF" value="1" />
		</td> -->
		<td class="td0">身&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;份</td>
		<td align="left"  colspan="3"><input type="hidden" name="SFID" value=""
			special="wordbook" wbtype="xf_sf" wbname="SFNAME"> <input
			type="hidden" name="SFNAME" value=""></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数</td>
		<td align="left"><input type="text" name="RS" value="1"
			onblur="javascript:addItem(this.value);" /> 人</td>
		<td class="td0">所 属 地</td>
		<td align="left">
		<input type="text" name="SSDNAME" value="">
		</td>
	</tr>
	<tr align="right" valign="middle">
		<!-- <td class="td0">是否重复反映</td>
		<td align="left"><input type="radio" name="SFCF" value="0"
			checked="checked" /> 首次反映 <input type="radio" name="SFCF"
			value="1" /> 重复反映</td> -->
		<td class="td0">被反映单位</td>
		<td align="left"  colspan="3"><input type="text" name="BFYDW"
			maxlength="50" value="" /></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">信访日期</td>
		<td align="left"><input name="XFTIME" size="15"
			value="" type="hidden" special="date"/></td>
		<td class="td0">信息重要程度</td>
		<td align="left">
		<input type="hidden" name="ZYCDNAME" value=""> 
		</td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">登 记 人</td>
		<td align="left">
		<input type="hidden" name="DJRNAME" value=""></td>
		<td class="td0">经办部门</td>
		<td align="left"> <%= g_groupName %></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;容</td>
		<td colspan="3" align="left"><textarea name="NR" cols="80"
			rows="5"></textarea></td>
	</tr>
	<!-- 
	<tr align="right" valign="middle">
		<td class="td0">关 键 字</td>
		<td colspan="3" align="left"><input type="text" name="GJZ"
			maxlength="50" size="80" value="" /></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">处理方式</td>
		<td colspan="3" align="left"><textarea name="CLFS" cols="80" rows="3"></textarea>
		</td>
	</tr> -->
	<tr align="right" valign="middle" id="lingdao1">
		<td align="right" valign="middle" class="td0">接待领导</td>
		<td align="left">
		<input type="text" name="JDLDNAME" value="">
		</td>
		<td class="td0">领导职务</td>
		<td align="left">
		<input type="hidden" name="LDZWID" value="" special="wordbook" wbtype="" wbname="LDZWNAME">
		<input type="hidden" name="LDZWNAME" value=""> 
		</td>
	</tr>
	<tr align="right" valign="middle" >
		<td class="td0">领导批示</td>
		<td colspan="3" align="left"><textarea name="LDPS" cols="80" rows="3"></textarea></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">领导批示件</td>
		<td colspan="3" align="left"><input type="file" name="LDPSJ" id="LDPSJ" /></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">交 办 单</td>
		<td colspan="3" align="left"><input type="file" name="JBD" id="JBD"/></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">限结日期</td>
		<td align="left" colspan="3"><input name="XJTIME" value="" type="hidden" special="date"/></td>
	</tr>
	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center">来访人</div>
		</td>
	</tr>
	<tr>
		<td colspan="4" class="nopadding">
		<table border="1" id="lxr" class="tab-noborder" width="100%" cellspacing="0"
			cellpadding="0">
			<tr>
				<td class="td0" style="border:0px;">信访人姓名</td>
				<td class="td0" style="border:0px;">性别</td>
				<td class="td0" style="border:0px;">年龄</td>
				<td class="td0" style="border:0px;">身份证号</td>
				<td class="td0" style="border:0px;">联系电话</td>
				<td class="td0" style="border:0px;">邮政编码</td>
				<td class="td0" style="border:0px;">单位或地址</td>
			</tr>
			<%
					if (list != null && !list.isEmpty()) {
					for (int i = 0; i < list.size(); i++) {
			%>
			<tr>
				<td style="border:0px;"><input type="hidden"
					name="lfdtid_<%=i %>" special="key" id="lfdtid_<%=i %>" /> <input
					type="hidden" name="lfid_<%=i %>" id="lfid_<%=i %>" special="key" /><input
					type="text" name="XF_USERNAME_<%=i %>" id="XF_USERNAME_<%=i %>" /></td>
				<td style="border:0px;"><select name="XF_USERSEX_<%=i %>"
					id="XF_USERSEX_<%=i %>">
					<option value="1">男</option>
					<option value="0">女</option>
				</select></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERAGE_<%=i %>" id="XF_USERAGE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERLICENSE_<%=i %>" id="XF_USERLICENSE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERTEL_<%=i %>" id="XF_USERTEL_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERCODE_<%=i %>" id="XF_USERCODE_<%=i %>" /></td>
				<td style="border:0px;"><input type="text"
					name="XF_USERADDRESS_<%=i %>" id="XF_USERADDRESS_<%=i %>" /></td>
			</tr>
			<%
				}
				}
			%>
		</table>
		</td>
	</tr>
</table>
<div>&nbsp;<div>
</form>
</BODY>
</HTML>
